package com.qf.tenant.manager.api;

import com.qf.common.bean.R;
import com.qf.tenant.manager.service.DeviceTopicService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("/tenant/device-topic")
@Tag(name = "DeviceTopicController", description = "Topic主题管理")
public class DeviceTopicController {

    @Autowired
    private DeviceTopicService deviceTopicService;

    @GetMapping("/list/{deviceKey}")
    @Operation(summary = "Topic主题接口 - 根据设备Key查询主题列表",description = "根据设备Key查询主题列表")
    public R list(@PathVariable("deviceKey") String deviceKey){
        R r = deviceTopicService.listByDeviceKey(deviceKey);
        return r;
    }

}
